import  service from "@/common/request.js"
// export const login = (params) => service.post('oauth/token', params, {
// 	header: {
// 		'Content-Type': 'application/x-www-form-urlencoded'
// 	}
// })

// 登录
export const login = (params) => service.get('/api/appletapi/login', params, {
	header: {
		'Content-Type': 'application/x-www-form-urlencoded'
	}
})

// 部门列表
export const listBm = (params) => service.get('/api/appletapi/listBm', params, {
	header: {
		'Content-Type': 'application/x-www-form-urlencoded'
	}
})

// 厂区列表
export const listCq = (params) => service.get('/api/appletapi/listCq', params, {
	header: {
		'Content-Type': 'application/x-www-form-urlencoded'
	}
})

// 注册
export const register = (params) => service.post('/api/appletapi/register', params, {
	header: {
		'Content-Type': 'application/x-www-form-urlencoded'
	}
})

// 重置密码
export const resetPassword = (params) => service.post('/api/appletapi/resetPassword', params)

// 用户信息
export const getUserInfo = (params) => service.get('/api/appletapi/getUserInfo', params, {
	header: {
		'Content-Type': 'application/x-www-form-urlencoded'
	}
})

// 修改用户信息
export const updateUserSwl = (params) => service.post('/api/appletapi/updateUser', params, {
	header: {
		'Content-Type': 'application/x-www-form-urlencoded'
	}
})

// 修改密码
export const updatePassword = (params) => service.post('/api/appletapi/updatePassword', params, {
	header: {
		'Content-Type': 'application/x-www-form-urlencoded'
	}
})

// 取消订单
export const cancelOrder = (params) => service.get('/api/appletapi/cancelOrder', params, {
	header: {
		'Content-Type': 'application/x-www-form-urlencoded'
	}
})
